package com.education.welco.service.impl;

import java.util.List;

import com.education.common.utils.Convert;
import com.education.welco.mapper.TClassroomMenuMapper;
import com.education.welco.pojo.TClassroomMenu;
import com.education.welco.service.ITClassroomMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 学校教室目录 服务层实现
 *
 * @author d
 * @date 2020-05-11
 */
@Service
public class TClassroomMenuServiceImpl implements ITClassroomMenuService {

    @Autowired
    private TClassroomMenuMapper tClassroomMenuMapper;

    /**
     * 查询学校教室目录信息
     *
     * @param id 学校教室目录ID
     * @return 学校教室目录信息
     */
    @Override
    public TClassroomMenu selectTClassroomMenuById(Integer id) {
        return tClassroomMenuMapper.selectTClassroomMenuById(id);
    }

    /**
     * 查询学校教室目录列表
     *
     * @param tClassroomMenu 学校教室目录信息
     * @return 学校教室目录集合
     */
    @Override
    public List<TClassroomMenu> selectTClassroomMenuList(TClassroomMenu tClassroomMenu) {
        return tClassroomMenuMapper.selectTClassroomMenuList(tClassroomMenu);
    }

    /**
     * 新增学校教室目录
     *
     * @param tClassroomMenu 学校教室目录信息
     * @return 结果
     */
    @Override
    public int insertTClassroomMenu(TClassroomMenu tClassroomMenu) {
        return tClassroomMenuMapper.insertTClassroomMenu(tClassroomMenu);
    }

    /**
     * 修改学校教室目录
     *
     * @param tClassroomMenu 学校教室目录信息
     * @return 结果
     */
    @Override
    public int updateTClassroomMenu(TClassroomMenu tClassroomMenu) {
        return tClassroomMenuMapper.updateTClassroomMenu(tClassroomMenu);
    }

    /**
     * 删除学校教室目录对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTClassroomMenuByIds(String ids) {
        return tClassroomMenuMapper.deleteTClassroomMenuByIds(Convert.toStrArray(ids));
    }
}